// 1. 初始状态.
const state = () => ({
    collapsed: true,
});

// 2. 计算属性.
const getters = {};

// 3. 异步修改.
const actions = {};

// 4. 同步修改.
const mutations = {
    toggle(state) {
        state.collapsed = !state.collapsed;
    },
};

// 5. 模块导出.
export default {
    namespaced: true,
    state,
    getters,
    actions,
    mutations,
};
